// 封装组织架构的网络请求
import request from '@/utils/request'
// 查询企业的部门列表
export function getDeptListApi() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}
//根据id 删除相应部门
export function delDeptApi(id) {
  return request({
    url: `/company/department/${id}`,
    method:'DELETE'
  })
}
// 新增部门
export function addDeptApi(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 根据id获取渲染数据
export function getDeptByIdApi(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 根据ID修改部门情况
export function editDeptByIdApi(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}